#define SDLPP_USE_ALL
#include <sdl.hpp>

#include <iostream>

#include "win.hpp"

int main(int argc, char *argv[]) {
  auto rst = sdl::init(SDL_INIT_EVERYTHING);
  if (sdl::isFailed(rst)) {
    std::cout << "error init." << std::endl;
    return -1;
  }

  win_create();
  
  sdl::event::Event evt;
  while (sdl::event::wait(&evt)) {
    if (evt.type == sdl::event::Type::SDL_QUIT)
      break;
    win_handle(evt);
  }

  win_destroy();

  sdl::quit();
  return 0;
}